package com.ebelter.bodyfatscale.ui.pager.main;

import android.app.Activity;
import android.widget.ImageView;

import com.ebelter.bodyfatscale.R;
import com.ebelter.bodyfatscale.util.AppUtils;
import com.ebelter.btlibrary.util.ULog;

import butterknife.BindView;


public class InfoPager extends BasePagerMain {


    @BindView(R.id.infopic_water)
    ImageView infopic_water;//水分

    @BindView(R.id.infopic_vfl)
    ImageView infopic_vfl;//内脂等级

    @BindView(R.id.infopic_protein)
    ImageView infopic_protein;//蛋白质

    @BindView(R.id.infopic_bmi)
    ImageView infopic_bmi;//基础代谢

//    @BindView(R.id.info_bmi_t1)
//    TextView info_bmi_t1;//bmi
//
//    @BindView(R.id.info_bmi_t2)
//    TextView info_bmi_t2;//bmi

    public InfoPager(Activity context) {
        super(context );
    }

    @Override
    protected int loadLayoutById() {
        return R.layout.pager_info;
    }

    @Override
    public void initViews() {


        String locale= AppUtils.getLocalStr();
        ULog.i(TAG,"---当前语言--"+locale);
        if (locale==AppUtils.zh){//中文
            ULog.i(TAG,"用的是zh图");
            infopic_water.setImageResource(R.drawable.infopic_water_zh);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl_zh);
            infopic_protein.setImageResource(R.drawable.infopic_protein_zh);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi_zh);
        }else if (locale==AppUtils.en){
            ULog.i(TAG,"用的是en图");
            infopic_water.setImageResource(R.drawable.infopic_water);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl2);
            infopic_protein.setImageResource(R.drawable.infopic_protein);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi);
        }else if(locale==AppUtils.iw){
            ULog.i(TAG,"用的是iw图");
            infopic_water.setImageResource(R.drawable.infopic_water_iw);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl_iw);
            infopic_protein.setImageResource(R.drawable.infopic_protein_iw);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi_iw);
        }else if(locale==AppUtils.ru){
            ULog.i(TAG,"用的是ru图");
            infopic_water.setImageResource(R.drawable.infopic_water_els);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl_els);
            infopic_protein.setImageResource(R.drawable.infopic_protein_els);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi_els2);
        }

//        info_bmi_t1.setText(StringUtils.getResStr(R.string.str_BMI));
//        info_bmi_t2.setText(StringUtils.getResStr(R.string.str_BMI_introduce));

    }

    @Override
    public void initData(Object data) {

    }

    @Override
    public void switchUnitUpdate() {

    }
}
